package com.hongguan.oms.service.pact;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.hongguan.oms.service.BaseService;

/**
 *
 * @author	tonylin <br>
 * @create	2011-1-9 <br>
 * @project	Haojin <br>
 * @copyright 2011 HongGuan Information. All rights reserved
 * @desc <br>
 */

@SuppressWarnings("unchecked")
@Service
public class PactService extends BaseService {
	public PactService() {
		this.namespace = "Pact";
	}
	
	public void djPact (Map<String, Object> map) {
		this.getSqlMapClientTemplate().update(
				this.getStatementName("djPact"), map);
		
	}
	
	public List searchPact(Map<String, Object> map) {
		return this.getSqlMapClientTemplate().queryForList(
				this.getStatementName("searchPact"), map);
	}
	public Long searchPactCount(Map<String, Object> map) {
		return (Long) this.getSqlMapClientTemplate().queryForObject(
				this.getStatementName("searchPactCount"), map);
	}
	
	
	public void updatePact(Map<String, Object> map){
		this.getSqlMapClientTemplate().update(
				this.getStatementName("updatePact"), map);
		
	}
	
	
	public void addPact(Map<String, Object> map){
		this.getSqlMapClientTemplate().insert(
				this.getStatementName("addPact"), map);
		
	}
	 
}
